//
//  MKGrayBarView.m
//  singForYou
//
//  Created by nicolas on 2017/3/8.
//  Copyright © 2017年 nicolas. All rights reserved.
//

#import "MKGrayBarView.h"

#import "Masonry.h"
@interface MKGrayBarView ()

@property (nonatomic, strong) UIButton *leftBtn;

@end


@implementation MKGrayBarView

- (instancetype)initWithFrame:(CGRect)frame {
    
    if (self= [super initWithFrame:frame]) {
        
        UIButton *leftBtn = [[UIButton alloc] init];
        
        [leftBtn setBackgroundImage:[UIImage imageNamed:@"menu_icon_right"] forState:UIControlStateNormal];
        
        [self addSubview:leftBtn];
        
        self.backgroundColor = [UIColor grayColor];
        
        self.alpha = 0.4;
        
        self.leftBtn = leftBtn;
    }
    
    return self;
    
}

- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    [self.leftBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        
        make.center.equalTo(self);
        
        make.width.mas_equalTo(20);
        
        make.height.mas_equalTo(20);
        
    }];
    
}

@end
